@layout("/common/_container.html"){
<div class="ibox float-e-margins">
	<div class="ibox-content">
	<div class="form-horizontal" id="configDetailForm">
	   <div class="panel panel-default">
    <div class="panel-heading">基础设置</div>
    <div class="panel-body">
    <input type="hidden" id="configCode" value="${config.configCode}">
			<div class="row">
				<div class="col-sm-6 b-r">
					<#input id="configName" name="配置名称" underline="true" value="${config.configName}"/>
					  
					   <#select id="configType" name="配置类型" underline = "true" value="${config.configType}">
					     <option value="">请选择</option>
                        @for(configType in configTypeList){
                            @if(configType.configType ==  config.configType){
                            <option value="${configType.configType}" selected>${configType.configType}</option>
                            @}
                            @if(configType.configType !=  config.configType){
                            <option value="${configType.configType}">${configType.configType}</option>
                            @}
                        @}
                    </#select>
				    <#select id="configStyle" name="配置样式">
				     <option value="">请选择</option>
				        @for(configStyle in configStyleList){
				            @if(configStyle.configStyle ==  config.configStyle){
                           <option value="${configStyle.configStyle}" selected>${configStyle.configStyle}</option>
                           @}
                           @if(configStyle.configStyle !=  config.configStyle){
                           <option value="${configStyle.configStyle}" >${configStyle.configStyle}</option>
                           @}
                        @}
                    </#select>
				</div>
				<div class="col-sm-6 b-r">
					<#input id="configViewSize" name="元素条目" underline="true" value="${config.configViewSize}"/>
					<#input id="remark" name="配置描述" value="${config.remark}" />
				</div>
			</div>
    </div>
</div>
	<div class="panel panel-default">
	<div>
		<button type="button" class="btn btn-default pull-right"  style="margin-right:2px;margin-top:2px;margin-bottom:2px"  id="addChild_btn" data-original-title="点击添加元素" data-toggle="tooltip" data-placement="left"><span class="glyphicon glyphicon-wrench"></span></button>
	</div>
    <div class="panel-heading">元素设置</div>
    <div class="panel-body" id="configDetal_panel">
    @for(configChild in config.configChilds){
    <div class="col-sm-12"> 
              @if(configChildLP.index >1){
    <button type="button" class="btn btn-default pull-right" style="margin-right:3px;margin-top:3px;margin-bottom:3px" data-original-title="点击删除元素" data-toggle="tooltip" data-placement="left">
			<span class="glyphicon glyphicon-trash"></span>
	</button>
	      @}
				  <div class="panel panel-default"> 
				  <div class="panel-heading">元素详细设置</div> 
				  <div class="panel-body">
				  <div class="row" >
				    <div class="col-sm-6 col-md-6 b-r ">
				    <div><a href="#" class="thumbnail">
                <img src="${configChild.img}">
            </a></div>
              <div > 
				  <input  name="files[]" type="file" class="file" data-language="zh" data-show-remove="false" data-show-cancel="false" data-show-close="false" data-allowed-file-extensions='["jpg","png","jpeg","bmp","tif","gif","psd","ICO"]'  data-show-upload="false" data-show-caption="true" data-msg-placeholder="请选择" accept="image/*"> 
                  </div> 
				    </div>
				   <div class="col-sm-5">
                     <div class="row"> 
                  <div class="form-group"> 
				  <label class="col-sm-4 control-label">元素名称</label> 
				  <div class="col-sm-8"><input type="hidden" name="codes" value="${configChild.code}"/><input class="form-control"  name="childName" type="text" value="${configChild.name}"></div> 
				  </div> 
				  </div> 
                  <div class="hr-line-dashed"></div> 
                 
                       <div class="row"> 
                  <div class="form-group"> 
				  <label class="col-sm-4 control-label">跳转URL</label> 
				  <div class="col-sm-8">
				    <select class="form-control" name="childUrl">
				     <option value="">请选择</option>
				        @for(dic in dicList){
				           @if(dic.dicTypeNo ==  configChild.url){
				                <option value="${dic.dicTypeNo}" selected>${dic.dicTypeName}</option>
                           @}
                           @if(dic.dicTypeNo !=  configChild.url){
				                 <option value="${dic.dicTypeNo}">${dic.dicTypeName}</option>
                           @}
                        @}
                    </select>
				  
				  </div> 
				  </div> 
                  </div> 
                    <div class="row"> 
                   <div class="hr-line-dashed"></div> 
                  <div class="form-group"> 
				  <label class="col-sm-4 control-label">排序</label> 
				  <div class="col-sm-8"><input class="form-control"  name="sort" type="text" value="${configChild.sort}"></div> 
				  </div> 
                  </div> 
                  <div class="hr-line-dashed"></div> 
                  <div class="row"> 
                  <div class="form-group"> 
				  <label class="col-sm-4 control-label">执行动作</label> 
				  <div class="col-sm-8">
				     <select class="form-control"  name="childAction">
				     <option value="">请选择</option>
				        @for(configAction in configActionList){
				           @if(configAction.key ==  configChild.action){
                           <option value="${configAction.key}" selected>${configAction.name}</option>
                           @}
                            @if(configAction.key !=  configChild.action){
                            <option value="${configAction.key}">${configAction.name}</option>
                           @}
                        @}
                    </select></div> 
				  </div> 
                  </div> 
           </div> 
           
             </div>
				  </div> 
				  </div> 
				  </div> 
				  @}
				  </div> 
    </div>
	</div>
			<div class="row btn-group-m-t">
				<div class="col-sm-10">
					<#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="ConfigDetail.editSubmit()"/>
					<#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="ConfigDetail.close()"/>
				</div>
			</div>
	</div>
</div>
<link href="${ctxPath}/static/css/fileinput.min.css" rel="stylesheet">
<script src="${ctxPath}/static/modular/packback/config/config_info.js"></script>
<script src="${ctxPath}/static/modular/packback/config/fileinput.min.js"></script>
<script src="${ctxPath}/static/modular/packback/config/zh.min.js"></script>
@}
